package com.hs.srm.admin.modules.orders.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

/*
 * 扫描入库表
 */

/**
 * @Description:收货表
 * @Author socik
 * @Date 2019/5/13 9:13
 */
@Setter
@Getter
@TableName("stock")
@ToString
public class StockEntity implements Serializable {

    private static final long serialVersionUID = 1L;
    // 试用检验状态（0已收货、1验货中、2已验货、3试用中、4试用通过、-4试用不通过、5对账中、6对账成功、-6对账失败）
    public static final int YI_SHOU_HUO = 0;
    public static final int YAN_HUO_ING = 1;
    public static final int YI_YAN_HUO = 2;
    public static final int SHI_YONG_ING = 3;
    public static final int SHI_YONG_SUCCESS = 4;
    public static final int DUI_ZHANG_ING = 5;
    public static final int DUI_ZHANG_SUCCESS = 6;
    public static final int DUI_ZHANG_FAILURE = -6;

    public StockEntity() {
        super();
    }

    /*
     * 行项目id
     */
    @TableId(value = "pk_id", type = IdType.UUID)
    @TableField("pk_id")
    @Excel(name = "行项目id", orderNum = "1")
    private String pkId;

    /*
     * 发货单号
     */
    @TableField("deliver_no")
    @Excel(name = "发货单号", orderNum = "2")
    private String deliverNo;

    /*
     * 订单号
     */
    @TableField("po_no")
    @Excel(name = "订单号", orderNum = "3")
    private String poNo;

    /*
     * 行项目号
     */
    @TableField("item_no")
    @Excel(name = "行项目号", orderNum = "4")
    private String itemNo;

    /*
     * 行项目id
     */
    @TableField("po_item_id")
    @Excel(name = "行项目id", orderNum = "5")
    private String poItemId;

    /*
     * 收货日期时间
     */
    @TableField("stock_time")
    @Excel(name = "收货日期", orderNum = "6")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private java.util.Date stockTime;

    /*
     * 收货数量
     */
    @TableField("shipped_qty")
    @Excel(name = "收货数量", orderNum = "7")
    private java.math.BigDecimal shippedQty;

    /*
     * 二维码的url
     */
    @TableField("photo_url")
    @Excel(name = "二维码的url", orderNum = "8")
    private String photoUrl;

    /*
     * 发货版本
     */
    @TableField("edition")
    @Excel(name = "发货版本", orderNum = "9")
    private String edition;

    /*
     * 试用检验状态（0已收货、1验货中、2已验货、3试用中、4试用通过、-4试用不通过、5对账中、6对账成功、-6对账失败）
     */
    @TableField("status")
    @Excel(name = "试用检验状态（0已收货、1验货中、2已验货、3试用中、4试用通过、-4试用不通过、5对账中、6对账成功、-6对账失败）", orderNum = "10")
    private Integer status;
    /*
     * 同步时间
     */
    @TableField("syncuname")
    @Excel(name = "同步时间", orderNum = "11")
    private String syncuname;

    /*
     * 同步状态
     */
    @TableField("syncstat")
    @Excel(name = "同步状态", orderNum = "12")
    private String syncstat;

    /*
     * 收货单号
     */
    @TableField("mblnr")
    @Excel(name = "收货单号", orderNum = "13")
    private String mblnr;

    /*
     * 收货行项目
     */
    @TableField("zeile")
    @Excel(name = "收货行项目", orderNum = "14")
    private String zeile;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;

}
